<template>
  <div>
    <!-- <el-select v-model="pageOpts.type"
               placeholder="请选择"
               @change="changeType">
      <el-option v-for="item in type"
                 :key="item.value"
                 :label="item.label"
                 :value="item.value">
      </el-option>
    </el-select> -->
    <el-select v-model="pageOpts.languageType"
               placeholder="请选择"
               @change="changeLang">
      <el-option v-for="item in lang"
                 :key="item.value"
                 :label="item.label"
                 :value="item.value">
      </el-option>
    </el-select>
    <el-Button @click="add"
               type="primary">添加</el-Button>
  </div>
</template>
<script>
const type = [
  {
    value: 0,
    label: "动态"
  },
  {
    value: 1,
    label: "媒体报告"
  }
];
const lang = [
  {
    value: 0,
    label: "中文"
  },
  {
    value: 1,
    label: "英文"
  }
];
export default {
  props: {
    pageOpts: Object
  },
  data() {
    return {
      lang,
      type
    };
  },
  methods: {
    changeType(type) {
      this.$emit("page-change", { ...this.pageOpts, type });
    },
    changeLang(languageType) {
      this.$emit("page-change", { ...this.pageOpts, languageType });
    },
    add() {
      this.$router.push({ name: "addNews" });
    }
  }
};
</script>


